package people;

/**
 * @Author MDD
 * @Description
 * @Version
 * @Date
 **/
public class People {
    public String name;
    public int age;
    public String sex;
    public String sn;

    public People(final String name, final int age, final String sex, final String sn) {
        this.name = name;
        this.age = age;
        this.sex = sex;
        this.sn = sn;
    }

    @Override
    public String toString() {
        return "People{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", sex='" + sex + '\'' +
                ", sn='" + sn + '\'' +
                '}';
    }


    static class Student extends People{
        private String stuNo;
        private String department;
        public Student(String name,int age,String sex,String sn,String stuno,String department){
            super(name, age, sex, sn);
            this.stuNo = stuno;
            this.department = department;

        }

        @Override
        public String toString() {
            return "Student{" +
                    "name='" + name + '\'' +
                    ", age=" + age +
                    ", sex='" + sex + '\'' +
                    ", sn='" + sn + '\'' +
                    ", stuNo='" + stuNo + '\'' +
                    ", department='" + department + '\'' +
                    '}';
        }
    }

    public static void main(String[] args) {
        People stuPeople = new Student("赵叶繁",20,"男","888","123","Java");
        System.out.println(stuPeople);
    }
}
